﻿<%@ Page Language="C#" Theme="SkinFile" MasterPageFile="~/MasterAdministradores.master" AutoEventWireup="true" CodeFile="ListaMesa.aspx.cs" Inherits="ListaMesa" Title="Página sin título" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" 
        AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None">
        <Columns>
            <asp:BoundField DataField="IdMesa" HeaderText="IdMesa" 
                SortExpression="IdMesa" />
            <asp:BoundField DataField="Ganado" HeaderText="Ganancias Casino" 
                SortExpression="Ganado" />
            <asp:HyperLinkField DataNavigateUrlFields="IdMesa" 
                DataNavigateUrlFormatString="~/MesaJuego.aspx?IdMesa={0}" Text="Ver Mesa" />
        </Columns>
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <RowStyle BackColor="#EFF3FB" />
        <EditRowStyle BackColor="#2461BF" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:casinoConnectionString %>" 
        SelectCommand="SELECT Jugada.IdMesa, SUM(Jugada.GCasino) AS Ganado
FROM casino.dbo.Jugada INNER JOIN casino.dbo.Mesa ON Jugada.IdMesa = Mesa.IdMesa 
WHERE Mesa.IdJuego = @IdJuego Group BY Jugada.IdMesa">
        <SelectParameters>
            <asp:QueryStringParameter Name="IdJuego" QueryStringField="IdJuego" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>

